import request from '@/utils/request'
import qs from 'qs';

// 查询标签列表
export function listTags(query) {
  return request({
    url: '/datahandler/b/tags/queryPageList',
    method: 'get',
    params: query
  })
}

// 新增标签
export function addTags(data) {
  return request({
    url: '/datahandler/b/tags/add',
    method: 'post',
    headers: {
      "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data: qs.stringify(data)
  })
}

// 编辑标签
export function updateTags(data) {
  return request({
    url: '/datahandler/b/tags/update',
    method: 'post',
    headers: {
      "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data: qs.stringify(data)
  })
}

// 删除标签
export function delTags(data) {
  return request({
    url: '/datahandler/b/tags/delete',
    method: 'post',
    headers: {
      "Content-Type": 'application/x-www-form-urlencoded;charset=UTF-8'
    },
    data: qs.stringify(data)
  })
}
